load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "githubpost",
    srcs = ["githubpost.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/bazci/githubpost",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/build/util",
        "//pkg/cmd/bazci/githubpost/issues",
        "//pkg/internal/codeowners",
        "//pkg/internal/team",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "githubpost_test",
    size = "small",
    srcs = ["githubpost_test.go"],
    data = glob(["testdata/**"]) + [
        "//:TEAMS.yaml",
        "//.github:CODEOWNERS",
    ],
    embed = [":githubpost"],
    deps = [
        "//pkg/build/util",
        "//pkg/cmd/bazci/githubpost/issues",
        "//pkg/testutils/datapathutils",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
    ],
)
